<?php

require_once realpath (dirname (__FILE__) . '//..//..//..//..//pages.php');
require_once INC_FUNCTIONS;
$db = openConnection ();
$result = $db->select (array ('studente', 'frequenta', 'classe'), array ('classe.nome, COUNT(*) AS studenti'), 'frequenta.IDclasse=classe.ID AND frequenta.IDstudente=studente.ID', 'classe.ID');
while ($row = $db->fetchAssoc ($result)) {
    $x[] = $row['nome'];
    $y[] = $row['studenti'];
}

require_once GRAPH_PIE;
?>
